import {request} from "../utils/index.js";

export function getClassInfo(name) {
    return request({
        url: `/getClassInfo?name=${name}`,
        method : "get"
    })
}

export function addClassInfo(data) {
    return request({
        url: "/addClassInfo",
        method : "post",
        data
    })
}

export function deleteClassInfo(data) {
    return request({
        url: "/deleteClass",
        method : "delete",
        data
    })
}

export function updateClassInfo(data) {
    return request({
        url: "/updateClass",
        method : "post",
        data
    })
}

export function batchDeleteClassInfo(data) {
    return request({
        url: "/batchDeleteClass",
        method : "delete",
        data
    })
}

export function getClassStudentInfo(classId) {
    return request({
        url: `/getClassStudentInfo?classId=${classId}`,
        method : "get"
    })
}

export function getClassInfoBySpecialtyId(specialtyId,grade) {
    return request({
        url: `/getClassInfoBySpecialtyId?specialtyId=${specialtyId}&grade=${grade}`,
        method : "get"
    })
}
export function removeClassStudent(data) {
    return request({
        url: "/removeClassStudent",
        method : "post",
        data
    })
}